from pydantic import BaseModel, Field
from typing import Optional
from fastapi import Query


class MenuQuery(BaseModel):
    page: int = Field(1, ge=1, description="页码", alias="current")
    size: int = Field(10, ge=1, le=100, description="每页数量")
    name: Optional[str] = Field(None, description="权限名称筛选")
    type: Optional[int] = Field(None, description="类型筛选：1-菜单，2-按钮")
    status: Optional[bool] = Field(None, description="状态筛选：True启用，False禁用")
    keyword: Optional[str] = Field(None, description="关键词搜索（名称/代码/描述/路径）")

